export const HOST = {
  BASE_URL: 'https://dengyizhineng.com',
  ASSETS_VIEW: '/assets-view'
}
export const API_STATUS = {
  SUCCESS: 'success',
  FAIL: 'fail'
}
export const API_RESPONSE_CODE = {
  SUCCESS: 0,
  NOT_LOGIN: 1
}
export const USER_ROLE = {
  ADMIN: 1,
  AGENT: 2,
  CUSTOMER: 3
}
export const EDIT_PERMISSION_ROLES = [USER_ROLE.ADMIN, USER_ROLE.AGENT]

export const FILE_TYPE = {
  IMAGE: 'image',
  VIDEO: 'video'
}

export const PROJECT_TAB = {
  INFO: 'info',
  LAMP: 'lamp',
  MAP: 'map',
  METER: 'meter',
  GATEWAY: 'gateway',
  MEMBERS: 'members'
}

export const PROJECT_TYPE = {
  HOUSING: 0,
  NON_HOUSING: 1
}

export const WARNING_TYPE = {
  WARRING: 1,
  ERROR: 2
}
export const WARNING_TYPE_NAME = {
  [WARNING_TYPE.WARRING]: '告警',
  [WARNING_TYPE.ERROR]: '故障'
}
export const WARNING_STATE = {
  HAPPEN: 1,
  REPAIRED: 2,
  REPLACED: 3
}

export const PROJECT_TYPE_NAME = {
  [PROJECT_TYPE.HOUSING]: '住宅',
  [PROJECT_TYPE.NON_HOUSING]: '非住宅'
}

export const IMAGE_EXT = ['png', 'jpg']
export const VIDEO_EXT = ['mp4']
export const DOC_EXT = {
  PDF: ['pdf'],
  WORD: ['doc', 'docx'],
  EXCEL: ['xls', 'xlsx'],
  PPT: ['ppt', 'pptx']
}
export const SCENE_TIME_TYPE = {
  DAILY: 1,
  WEEKLY: 2,
  DATE_AREA: 3,
};
export const WEEKDAY = {
  MON: 0,
  TUE: 1,
  WED: 2,
  THU: 3,
  FRI: 4,
  SAT: 5,
  SUN: 6,
};
export const MEMBER_PERMISSION = {
  OWNER: 0,
  ADMIN: 1,
  MEMBER: 2,
};
export const MEMBER_PERMISSION_TEXT = {
  [MEMBER_PERMISSION.OWNER]: '负责人',
  [MEMBER_PERMISSION.ADMIN]: '运维人员',
  [MEMBER_PERMISSION.MEMBER]: '普通成员',
};
/*******************  灯具参数设置  *******************/

export const FIELD_TYPE = {
  NUMBER: 'number',
  INPUT: 'input',
  SWITCH: 'switch',
  SELECT: 'selector',
}

export const GATEWAY_CMD = {
  SET_PARAM: 'setparam',
}
